package eee.xiang.cloud_learning.common.consistenthash;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * @author x-yin
 * @Date 2019/8/21
 */
@Data
public class Node {
    private Map<Integer, Object> dataMap = new HashMap<>();

    private String ip;
    private String port;

    public void putObj(Object obj){
        dataMap.put(obj.hashCode(), obj);
    }

    public void getObj(int key){
        dataMap.get(key);
    }
}
